<?php
	class Config
	{
		public static $MYSQL_HOST = '';
		public static $MYSQL_BENUTZER = '';
		public static $MYSQL_KENNWORT = '';
		public static $MYSQL_DATENBANK = 'leos';
			
		
		public static function resetConfig($configFile)
		{
			if(isset($configFile) &&  file_exists ( $configFile ))
			{
				$file = fopen($configFile, "r") or exit("Unable to open file!");
				
				while($text = fgets($file))
				{
					list ($key, $value) = explode(':', $text);
					
					if($key == 'dblocation')
						self::$MYSQL_HOST = str_replace(PHP_EOL, "", $value);
						
					if($key == 'dbuser')
						self::$MYSQL_BENUTZER = str_replace(PHP_EOL, "", $value);;
						
					if($key == 'dbpass')
						self::$MYSQL_KENNWORT = str_replace(PHP_EOL, "", $value);;
				}
			
				fclose($file);
			}
		}
	}
?>